<html>
<body>
Reports non-<code>Serializable</code> objects used as arguments to
<code>java.io.ObjectOutputStream.write()</code>. Such calls will result in runtime exceptions.
<p>
  This inspection assumes objects of the types <code>java.util.Collection</code> and
  <code>java.util.Map</code> to be <code>Serializable</code>, unless the types
  they are declared in are non-<code>Serializable</code>.
</p>
<p><b>Example:</b></p>
<pre><code>
  public class IWantToSerializeThis {
    public static void main(String[] args) throws IOException {
      try(var stream = new ObjectOutputStream(Files.newOutputStream(Paths.get("output")))) {
        // Warning -- will fail with NotSerializableException
        stream.writeObject(new IWantToSerializeThis());
      }
    }
  }
</code></pre>
<!-- tooltip end -->
</body>
</html>